﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace Prismx.Cool.Utils
{
    public class WaitUtil
    {
        //static Dictionary<string, UIElement> waitList = new Dictionary<string, UIElement>();
        ///// <summary>
        ///// 显示遮罩
        ///// </summary>
        ///// <param name="type"></param>
        ///// <param name="gridname"></param>
        //public static void Show(Grid gr, bool isWhite = false)
        //{
        //    if (gr == null)
        //    {
        //        return;
        //    }
        //    try
        //    {
        //        //var gr = WindowExtensions.GetChildObject<Grid>(control, gridname);
        //        Wait w = new Wait(isWhite);
        //        waitList.Add(gr.Name, w);
        //        gr.Children.Add(w);
        //    }
        //    catch
        //    {


        //    }
        //}
        ///// <summary>
        ///// 隐藏遮罩
        ///// </summary>
        ///// <param name="control"></param>
        ///// <param name="gridname"></param>
        //public static void Close(Grid gr)
        //{
        //    try
        //    {
        //        //var gr = WindowExtensions.GetChildObject<Grid>(control, gridname);
        //        gr.Children.Remove(waitList[gr.Name]);
        //        waitList.Remove(gr.Name);
        //    }
        //    catch
        //    {


        //    }
        //}

    }
}

